<?php
/**
 * Created by PhpStorm.
 * User: dell
 * Date: 2017/6/9
 * Time: 10:12
 */

namespace Admin\Logic\Controller;
use Admin\Model\HospitalModel;

class MainController extends AuthController{
    /**
     * @var HospitalModel
     */
    protected $hospitalModel = null;
    public function _initialize(){
        $this->hospitalModel = new HospitalModel();
    }
    public function getSelectHospital(){
        return session('h_id');
    }
    public function setSelectHospital($h_id){
        session('h_id',$h_id);
    }
    public function _exit($data,$msg,$code){
       $output = array(
        'data' => $data, 
        'msg' => $msg,
        'code' => $code //成功与失败的代码，一般都是正数或者负数
        );
        exit(json_encode($output));
    }
}